package com.martin;

 import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity {
	private void setScreenY() {
		DisplayMetrics dm = new DisplayMetrics();
		getWindowManager().getDefaultDisplay().getMetrics(dm);
		C.screenX = dm.widthPixels;
		C.screenY = dm.heightPixels;
		 
	}
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		 setScreenY() ;
		C.context = getApplicationContext();
		Button b = (Button) findViewById(R.id.button1);
//		b.setBackgroundColor(Color.BLACK);
		b.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				startActivity(new Intent().setClass(MainActivity.this,
						Right_Left_Activ.class));
				overridePendingTransition(R.anim.enter_lefttoright,
						R.anim.out_righttoleft);finish();

			}
		});
		// RelativeLayout v = (RelativeLayout) findViewById(R.id.main_linear);
		// LinearLayout actionbar = (LinearLayout) LayoutInflater.from(this)
		// .inflate(R.layout.actionbar_layout, null)
		// .findViewById(R.id.actionbar);
		// AddKillList killList = new AddKillList();
		// killList.init();
		// TranslateAnimation scaleAnimation = new TranslateAnimation( 1,0, 0,
		// 0);
		// scaleAnimation.setDuration(500);
		//
		// actionbar.addView(killList.getView());
		// v.addView(actionbar); v.setAnimation(scaleAnimation);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
